import { Router } from "express";
import commonController, { upload as commonUpload, handleMulterError } from '@/controllers/tool/common.controller';
import { authMiddleware } from "@/middlewares/auth.middleware";
const router = Router();

/**
 * 通用路由
 * 路径前缀：/common
 */

// ================== 通用上传接口 ==================
// 通用上传接口
router.post('/upload', authMiddleware, commonUpload.single('file'), handleMulterError, commonController.uploadFile);

export default router;
